const state = {
  currentPlayingVideo: null,
};

const mutations = {
  setCurrentPlayingVideo(state, video) {
    state.currentPlayingVideo = video;
  },
};

const actions = {
  updateCurrentPlayingVideo({ commit }, video) {
    commit('setCurrentPlayingVideo', video);
  },
};

const getters = {
  getCurrentPlayingVideo: (state) => state.currentPlayingVideo,
};

export default {
  namespaced: true, // 如果需要启用命名空间
  state,
  mutations,
  actions,
  getters,
};
